﻿
using Test30.Core;

namespace Test30.Engine
{
    public class DetectFeaturesAction : Action
    {
        public DetectFeaturesAction(Entity entity)
            : base(entity)
        {
        }

        protected override ActionResult OnProcess()
        {
            foreach (Vec pos in Dungeon.Bounds)
            {
                switch (Dungeon.Tiles[pos].Type)
                {
                    case TileType.DoorClosed:
                    case TileType.DoorOpen:
                    case TileType.StairsDown:
                    case TileType.StairsUp:
                    case TileType.TownPortal:
                        Dungeon.SetTileExplored(pos);
                        break;
                }
            }

            return ActionResult.Done;
        }
    }
}
